/*
*  Copyright 2019-2020 Liu
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package com.liu.modules.business.domain;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.io.Serializable;

/**
* @website https://el-admin.vip
* @description /
* @author Liu
* @date 2022-07-04
**/
@Entity
@Data
@Table(name="elj_advertising")
public class EljAdvertising implements Serializable {

    @Id
    @Column(name = "advertis_id")
    @ApiModelProperty(value = "ID")
    private String advertisId;

    @Column(name = "advertis_name")
    @ApiModelProperty(value = "广告名称")
    private String advertisName;

    @Column(name = "advertis_url")
    @ApiModelProperty(value = "广告地址")
    private String advertisUrl;

    @Column(name = "advertis_img_url")
    @ApiModelProperty(value = "广告图片地址")
    private String advertisImgUrl;

    @Column(name = "advertis_company")
    @ApiModelProperty(value = "广告公司")
    private String advertisCompany;

    @Column(name = "advertis_status")
    @ApiModelProperty(value = "状态")
    private String advertisStatus;

    @Column(name="advertis_img_size")
    @ApiModelProperty(value = "文件大小")
    private String advertisImgSize;

    @Column(name="advertis_img_real_name")
    @ApiModelProperty(value = "文件真实名")
    private String advertisImgRealName;

    @Column(name="advertis_img_type")
    @ApiModelProperty(value = "文件类型")
    private String advertisImgType;

    @Column(name="advertis_img_suffix")
    @ApiModelProperty(value = "文件后缀")
    private String advertisImgSuffix;

    @Column(name = "advertis_start_time")
    @ApiModelProperty(value = "发布时间")
    private String advertisStartTime;

    @Column(name = "advertis_end_time")
    @ApiModelProperty(value = "结束时间")
    private String advertisEndTime;

    public void copy(EljAdvertising source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}